<?php
namespace app\lucn\controller;

use think\Controller;
use think\Request;
use think\Db;
use think\Cache;
use fast\lucn\Lucn;

class Login extends Controller{
	
	public function _initialize()
    {
        define('SIGN', 'index');//定义标识
	 	define('DB', 'lucn30');//定义标识
		define('TABLE1', 'favorite_list');//定义标识
		define('TABLE2', 'favorite_class');//定义标识
		define('PRE', NULL);//定义标识
		$this->assign('module',Request::instance()->module());
        parent::_initialize();
    }
        

	public function index(){
		
	    $post = input('post.');
		if($post['username'] == 'lucn30' && $post['password'] == 'dddd9999'){
		  session('user_auth.uid',1);
		  $a = 1;$b='login success';
		}else{
		  $a = 0;$b='login false';
		}
		return (array('a'=>$a,'b'=>$b));
	}
	
	public function login(){
		return $this->Fetch('/nav_login');
	}

}